deps: upgrade npm to 11.18.0 - #64199
Conversation
|
Review requested:
|
|
This will need a rebase to fix the CI failures. |
This comment was marked as outdated.
This comment was marked as outdated.
|
The last lone maintainer of npm CLI is no longer at GitHub, and I don’t see anyone else being assigned yet. So, this may take longer to get rebased. |
b420b5e to
56b15b4
Compare
I've restarted the CI for this PR, but am making no promises about getting this into the 26.5.0 release. My intention for 26.5.0 was to start release builds tonight before I go to sleep so I can do the release tomorrow during my working hours (the worst case build time (which I don't know if we'll hit) is ~7 hours). We're past my work hours today so if I did try to get the npm release into 26.5.0 I'd have to give up a chunk of my evening to:
The good news for Node.js 26 is that we do current releases fairly often, so it should not be too long before the next release. |
|
Landed in fd35018 |
PR-URL: #64199 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
PR-URL: nodejs/node#64199 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com> Signed-off-by: Santiago Gimeno <santiago.gimeno@gmail.com>
|
Can this please be backported to 24.x and included in 24.19.0? |
|
A critical severity vulnerability CVE-2026-59873 for tar <7.5.19 is being reported in the
This would be resolved when this PR lands in Node.js 24.x and 26.x. For npm 10.x used in Node.js 22.x see separate issue Updated - now only affects Node.js 24.x:
|
PR-URL: #64199 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
|
A set of PRs for npm have been submitted, as listed on npm/cli#9827 The following two PRs are updates to npm 11.19.0: |
PR-URL: #64199 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
…paths (#4) * feat: add a code-based auto-merge guard, independent of the prompt text The "never auto-merge payment/auth/migration/secrets" rule has so far only existed as text Claude reads in the fix prompt — useful, but a model can misjudge it. This adds a second, mechanical line of defense: .github/workflows/auto-merge-guard.yml runs on any PR that has auto-merge enabled, diffs the actual changed files against a customizable regex (MURAQIB_SENSITIVE_PATHS repo variable, sensible default otherwise), and force-disables auto-merge + comments if it matches — regardless of what the PR author decided. The pattern-matching logic itself is unit tested (scripts/sensitive-path-pattern.test.mjs, 3 cases including a documented false-positive trade-off: a harmless file merely named after a sensitive topic still gets flagged on purpose, since a few minutes of review costs less than missing a real one). The webhook-triggered half (does GitHub actually fire this on a real auto-merge-enabled PR, does gh pr merge --disable-auto really take effect) can't be verified without a live PR against this repo — not done as part of this commit, noted here so it isn't mistaken for having been end-to-end tested. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: rebuild the auto-merge guard after adversarial review found it did not work Ran the first version through a dedicated adversarial + edge-case review before pushing anywhere. Both reviewers independently found it fundamentally broken, not just rough around the edges: 1. Used `pull_request` instead of `pull_request_target` — meant a PR could weaken the guard (empty its pattern, disable the job) in the same diff as a sensitive-path change, and get checked against its own already-neutered copy. `pull_request_target` always reads the workflow from the base branch, which the PR can't alter. 2. The unit tests exercised a JS RegExp hand-duplicated from a separate `grep -E` (POSIX ERE) string actually used in the workflow — the two dialects can disagree, so green tests didn't guarantee the production bash behaved the same way. 3. An invalid custom MURAQIB_SENSITIVE_PATHS pattern failed OPEN (grep silently treated it as "no match") instead of blocking. 4. The pattern never actually included "auth" despite every doc claiming it covered auth changes. 5. No documentation of the real requirement: this only actually blocks a merge if configured as a required status check in branch protection, since the job itself runs async and can't stop native auto-merge from completing first. Rebuilt: all matching logic now lives in one place (scripts/check-sensitive-paths.mjs), imported by both the workflow (via a plain `node` invocation, no more grep) and its own test suite (check-sensitive-paths.test.mjs, 7 cases: default-pattern matches including auth and the workflow file itself, unrelated files pass, empty diff passes, invalid custom pattern fails closed, valid custom pattern overrides the default, non-ASCII filenames match correctly, matching is case-insensitive). Changed files are read via the GitHub API, never by checking out the PR's own ref. README/SECURITY.md/LESSONS.md updated to document the required-status-check requirement and the full history of what was wrong with the first version. The webhook-triggered half (does pull_request_target actually behave as documented on a live PR, does the required-status-check race close in practice) still can't be verified without a real test PR against this repo — noted explicitly, not claimed as tested. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: pagination crash + two secondary gaps found in round-2 review Both reviewers in the second review round independently found and reproduced the same critical bug against real large PRs (nodejs/node#64199, 293 files; cli/cli#14278, 252 files): `gh api ... --paginate --jq "[.[].filename]"` crashes on any response spanning more than one page, because gh applies --jq per-page before merging, producing several concatenated JSON array literals instead of one valid document. The uncaught JSON.parse meant the guard crashed before it could evaluate whether the PR even needed blocking — on precisely the large-refactor PRs where an accidental sensitive-path touch is most likely. Fixed by dropping --jq entirely from both --paginate calls (file list and existing-comments lookup) and moving the parsing into two testable functions: parsePaginatedArrayOutput (defensively flattens an array-of-page-arrays, in case anything ever produces that shape again) and extractCheckablePaths (also pulls previous_filename for renamed files, closing a smaller round-2 finding: a rename with no content change would otherwise evade the guard under its old, possibly-sensitive name). Verified against real production data, not just reasoning: reproduced the old crash and confirmed the fix against the actual nodejs/node#64199 PR (293 files) before writing this commit. Also fixed: secrets?[._-] required "secrets" to be followed immediately by ".", "_" or "-" — a bare secrets/ directory (k8s/secrets/prod.yaml) slid through undetected. Widened to secrets?(/|[._-]|$). 6 new test cases (13 total in this file): multi-page parsing, defensive flatten, malformed-JSON still throws (not silently empty), rename old-path inclusion, bare secrets/ directory, and one true end-to-end case combining all of the above against a simulated 151-file PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: require a real path boundary before "secrets", not a bare substring Round-3 review confirmed the pagination fix holds (re-verified against the real 293-file PR, 18/18 tests green) and found one remaining gap: secrets?(/|[._-]|$) fixed the right-hand boundary (a bare secrets/ directory now matches) but never required a boundary on the left, so "notsecrets.txt" or "topsecretsauce.md" would also trip the guard. Fails toward caution, not away from it (unnecessary manual review, not a missed real secret), so this was assessed as low-severity — fixed anyway since it was already found and the correction is a one-line, fully verified change: (^|[/._-])secrets?(/|[._-]|$). New test covers both directions (false positives removed, true positives retained). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

11.18.0 (2026-06-29)
Features
3021ad6#9694 arborist: extend replace-registry-host with URL prefix matching (#6110) (#9694) (@github-actions[bot], @u2mejc)abd8c6b#9677 graduate the linked install strategy from experimental to stable (#9677) (@github-actions[bot], @manzoorwanijk)9420673#9662 install-scripts: prune unused allowScripts entries (#9662) (@github-actions[bot], @JamieMagee)fc9d4c7#9635 namespace install-script approval commands under npm install-scripts (#9635) (@manzoorwanijk)073253f#9564 warn when min-release-age blocks an audit fix (#9564) (@github-actions[bot], @JamieMagee)Bug Fixes
598ffdb#9693 sbom: percent-encode vcs_url qualifier in generated purls (#9693) (@github-actions[bot], @ubeddulla)05793d0#9691 output all the required parameters for npm token list (#9691) (@github-actions[bot], @rijildaniel)cd57139#9669 arborist: surface undeclared workspaces under the linked strategy (backport release/v11) (#9669) (@manzoorwanijk)5b6ff9c#9667 reify: report added count for fresh linked installs (#9667) (@github-actions[bot], @manzoorwanijk, @owlstronaut)8f13beb#9664 query: report logical dep location under linked strategy (#9664) (@github-actions[bot], @manzoorwanijk)168ba30#9663 allowScripts: close enforcement gaps (#9652) (backport release/v11) (#9663) (@JamieMagee)ae64f88#9648 exec: resolve workspace-local bin under the linked install strategy (#9648) (@github-actions[bot], @manzoorwanijk)784cbe9#9636 ls: restore 100% coverage on release/v11 after #9633 (#9636) (@manzoorwanijk)70f0ea5#9607 approve-scripts: approve deps with no resolved URL by name (#9607) (@github-actions[bot], @JamieMagee)b2e6338#9602 arborist: don't flag inert optional deps in strict-allow-scripts (#9602) (@github-actions[bot], @JamieMagee)6ad5715#9595 link: scopenpm link --workspaceto the workspace, not the root (#9595) (@github-actions[bot], @manzoorwanijk)Documentation
3658bb5#9690 recommend install-strategy=linked to catch phantom dependencies (#9690) (@github-actions[bot], @manzoorwanijk)Dependencies
54656b6#9696undici@6.27.031c4773#9696brace-expansion@5.0.7e773c77#9696tar@7.5.19f05f6af#9696semver@7.8.5804f9ba#9580npm-profile@12.0.2Chores
f79b37f#9696 dev dependency updates (@owlstronaut)a04cd84#9584 add web-login proxy doneUrl regression for npm-profile fix (#9584) (@github-actions[bot], @manzoorwanijk)@npmcli/arborist@9.9.0@npmcli/config@10.12.0libnpmdiff@8.1.11libnpmexec@10.3.1libnpmfund@7.0.25libnpmpack@9.1.11arborist: 9.9.0
9.9.0 (2026-06-29)
Features
3021ad6#9694 arborist: extend replace-registry-host with URL prefix matching (#6110) (#9694) (@github-actions[bot], @u2mejc)abd8c6b#9677 graduate the linked install strategy from experimental to stable (#9677) (@github-actions[bot], @manzoorwanijk)9420673#9662 install-scripts: prune unused allowScripts entries (#9662) (@github-actions[bot], @JamieMagee)073253f#9564 warn when min-release-age blocks an audit fix (#9564) (@github-actions[bot], @JamieMagee)Bug Fixes
774875b#9686 arborist: keep bin links for allowScripts-denied packages (#9686) (@JamieMagee)719de1e#9673 arborist: apply overrides across a file: link (backport release/v11) (#9673) (@manzoorwanijk)cd57139#9669 arborist: surface undeclared workspaces under the linked strategy (backport release/v11) (#9669) (@manzoorwanijk)ede32d3#9668 arborist: forward transitive overrides through linked store links (#9658) (backport release/v11) (#9668) (@manzoorwanijk)f503b07#9666 correct dev/prod dep flags for workspaces under the linked strategy (#9666) (@github-actions[bot], @manzoorwanijk)f580889#9665 arborist: load transitive optional deps into linked actual tree (#9665) (@github-actions[bot], @manzoorwanijk)8f13beb#9664 query: report logical dep location under linked strategy (#9664) (@github-actions[bot], @manzoorwanijk)168ba30#9663 allowScripts: close enforcement gaps (#9652) (backport release/v11) (#9663) (@JamieMagee)4c9eacb#9649 arborist: clean up stale .store and hoisted dirs on strategy switch (#9649) (@github-actions[bot], @manzoorwanijk)d2c680e#9645 arborist: invalid filterNode crash under the linked strategy (#9645) (@github-actions[bot], @manzoorwanijk)4e40b1c#9644 arborist: repair wrong-but-existing symlink target in linked strategy (#9644) (@github-actions[bot], @manzoorwanijk)9d1774e#9643 arborist: remove stale .bin shims after uninstall under linked (#9643) (@github-actions[bot], @manzoorwanijk)ed37d24#9642 arborist: record the linked .store layout in the hidden lockfile (backport #9630) (#9642) (@manzoorwanijk)e601d4a#9641 arborist: validate peerOptional conflicts in no-save mutations (#9641) (@owlstronaut, @dale-lakes, @dale-lakes)03cee43#9638 arborist: fix audit-report determinism due to dropped via links (#9638) (@github-actions[bot], @arjun-vegeta)a30d855#9633 arborist: don't load store packages' devDependencies as required edges (#9633) (@manzoorwanijk)887ca97#9631 arborist: audit the non-isolated tree under the linked strategy (#9631) (@github-actions[bot], @manzoorwanijk)b2e6338#9602 arborist: don't flag inert optional deps in strict-allow-scripts (#9602) (@github-actions[bot], @JamieMagee)390ebfa#9593 arborist: symlink workspace file: deps on non-workspace local packages (#9593) (@github-actions[bot], @manzoorwanijk)aaeb2f1#9578 arborist: expose store node_modules via NODE_PATH for linked-strategy install scripts (#9578) (@github-actions[bot], @manzoorwanijk)05b6f0f#9577 arborist: allow-remote exemption for proxy/mirror-fronted registry tarballs (#9577) (@github-actions[bot], @manzoorwanijk)config: 10.12.0
10.12.0 (2026-06-29)
Features
3021ad6#9694 arborist: extend replace-registry-host with URL prefix matching (#6110) (#9694) (@github-actions[bot], @u2mejc)abd8c6b#9677 graduate the linked install strategy from experimental to stable (#9677) (@github-actions[bot], @manzoorwanijk)073253f#9564 warn when min-release-age blocks an audit fix (#9564) (@github-actions[bot], @JamieMagee)Bug Fixes
b2e6338#9602 arborist: don't flag inert optional deps in strict-allow-scripts (#9602) (@github-actions[bot], @JamieMagee)Documentation
3658bb5#9690 recommend install-strategy=linked to catch phantom dependencies (#9690) (@github-actions[bot], @manzoorwanijk)libnpmdiff: 8.1.11
Dependencies
@npmcli/arborist@9.9.0libnpmexec: 10.3.1
10.3.1 (2026-06-29)
Bug Fixes
f3f2465#9692 exec: prevent shared binPaths pollution across workspace runs (#9692) (@github-actions[bot], @arjun-vegeta)b2e6338#9602 arborist: don't flag inert optional deps in strict-allow-scripts (#9602) (@github-actions[bot], @JamieMagee)Dependencies
@npmcli/arborist@9.9.0libnpmfund: 7.0.25
Dependencies
@npmcli/arborist@9.9.0libnpmpack: 9.1.11
Dependencies
@npmcli/arborist@9.9.0